package com.itwn.mapper;

import com.itwn.entity.Hall;
import com.itwn.entity.HallType;
import com.itwn.vo.HallVo;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import com.itwn.vo.HallTypeVo;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;
@Repository
public interface HallMapper {
    int deleteByPrimaryKey(Integer hallId);

    int insert(Hall record);

    Hall selectByPrimaryKey(Integer hallId);

    List<Hall> selectAll();

    int updateByPrimaryKey(Hall record);

    List<HallVo> selectByCon(@Param("hallName") String hallName,@Param("cinemaName") String cinemaName,@Param("hallTypeId") Integer hallTypeId);

    List<HallType> selectAllType();

    @Update("update c_hall set hall_state = 0 where hall_id = #{hallId}")
    int updateHallState(Integer hallId);

    @Select("select * from c_hall_type")
    List<HallTypeVo> selectAllHallType();
}